/*************************************************************************
	> File Name: 2.solve-3.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2024-11-27 13:01:32
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

#define MAX_M 20
#define MAX_N 10000

const int mod = 9973;
int dp[MAX_N + 5];
int val[MAX_M + 5];

int main() {
    int m, n;
    cin >> m >> n;
    for (int i = 1; i <= m; i++) {
        cin >> val[i];
    }
    dp[0] = 1;
    for (int i = 1; i <= m; i++) {
        for (int j = val[i]; j <= n; j++) {
            dp[j] += dp[j - val[i]];
            dp[j] %= mod;
        }
    }
    cout << dp[n] << endl;
    return 0;
}
